<template>
  <div id="table">
    <el-row>
      <el-col :span="24">
        <div ref="viewList" class="table-grid-content list-table btnDiy">
          <div style="overflow: auto">
            <div class="tag-views-title">
              {{ $t('查询视图') }}：
              <el-button size="mini" @click="managementView">{{ $t('管理视图') }}</el-button>
              <el-button size="mini" @click="addView">{{ $t('新建视图') }}</el-button>
              <el-button v-if="searchQueryList && searchQueryList.length > 0 || showSaveBtn" size="mini" type="primary" @click="openSaveView">{{ $t('保存视图') }}</el-button>
            </div>

          </div>
          <div v-if="$route.query.fundType === 'fof'" class="hide-add-deal-list-btn" />
          <div class="viewItem">
            <ul class="list-views">
              <li
                v-for="(item,index) in listSysSearch"
                :key="index"
                :class="[{selected: activeItem === item.viewId}]"
                :style="{'background':item.color}"
                @click="sysSearchActive(item)"
              >
                <div class="tag-number">{{ item.count }}</div>
                <div class="tag-label">{{ $t(item.viewName) }}</div>
              </li>
            </ul>
          </div>
        </div>
      </el-col>
    </el-row>

    <!-- 表格 -->
    <div class="list-table">
      <el-row ref="query">
        <el-col :span="12">
          <el-form inline>
            <el-form-item :label="$t('项目名称')" prop="dealName">
              <deal-select v-model="queryParams.dealName" size="small" :placeholder="$t('项目名称')" />
            </el-form-item>
            <el-form-item>
              <el-button type="primary" size="mini" @click="querySearch">{{ $t("搜索") }}</el-button>
              <el-badge v-if="getConditionCount" :value="getConditionCount" class="badge-item" type="primary">
                <el-button style="padding: 0 10px" type="text" size="mini" class="advance-query" @click="advanceHandler">{{ $t("高级搜索") }}</el-button>
              </el-badge>
              <el-button v-else style="padding: 0 10px" type="text" size="mini" class="advance-query" @click="advanceHandler">{{ $t("高级搜索") }}</el-button>
            </el-form-item>
          </el-form>
        </el-col>
        <el-col :span="12" style="text-align: right">
          <el-button
            v-if="dealType === 'property'"
            v-hasPermi="[hasPermiBtn]"
            type="primary"
            icon="el-icon-plus"
            size="mini"
            @click="addPropertyHandle"
          >{{ $t('添加') }}</el-button>
          <el-button
            v-else-if="dealType === 'lease'"
            v-hasPermi="[hasPermiBtn]"
            type="primary"
            icon="el-icon-plus"
            size="mini"
            @click="addLeaseHandle"
          >{{ $t('添加') }}</el-button>
          <el-button
            v-else-if="dealType === 'securities'"
            v-hasPermi="[hasPermiBtn]"
            type="primary"
            icon="el-icon-plus"
            size="mini"
            @click="addSecuritiesHandle"
          >{{ $t('添加') }}</el-button>
          <el-button
            v-else
            v-hasPermi="[hasPermiBtn]"
            type="primary"
            icon="el-icon-plus"
            size="mini"
            @click="addHandle"
          >{{ $t('添加') }}</el-button>
          <el-button v-hasPermi="[hasPermiImportBtn]" size="mini" @click="upload.open = true">{{ $t('导入') }}</el-button>
          <el-button v-hasPermi="[hasPermiExportBtn]" size="mini" style="margin-left: 0;" @click="exportDeal()">{{ $t('导出') }}</el-button>
        </el-col>
      </el-row>
      <div class="Table-table">
        <div class="left" :style="'height:' + leftHeight + 'px'">
          <div ref="options">
            <el-select v-model="queryParams.groupFieldType" :placeholder="$t('选择类型')" size="small" :clearable="false" @change="changeGroupFieldType">
              <el-option v-for="item in queryGroupFieldList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
            </el-select>
          </div>
          <div class="sideBar-content">
            <ul v-if="queryParams.groupFieldType !== 'tag'" class="industryUl">
              <li v-for="item in groupValueList" :key="item.value" :title="item.label" :class="queryParams.groupFieldValue === item.value ? 'link-type' : ''" @click="selectedGroup(item.value)">
                <el-tooltip effect="dark" :content="item.label" placement="right">
                  <span>{{ item.label }}</span>
                </el-tooltip>
                <span>{{ item.count }}</span>
              </li>
            </ul>
            <div v-else class="industry_tree">
              <el-tree
                :data="groupValueList"
                lazy
                :expand-on-click-node="false"
                :default-expanded-keys="expendList"
                highlight-current
                indent="5"
                node-key="value"
                :load="lazyLoadTree"
                @node-click="treeClickHandler"
              >
                <span slot-scope="{ node, data }" class="industry_tree_node" :class="tagKey === data.configId + '_' + data.value ? 'link-type' : ''" @click="() => {clickTagHandler(data)} ">
                  <el-tooltip effect="dark" :content="node.label" placement="right">
                    <span :title="node.label">{{ node.label }}</span>
                  </el-tooltip>
                  <span>{{ data.count }}</span>
                </span>
              </el-tree>
            </div>
          </div>
          <div ref="analysis" class="tit">
            <el-button type="text" @click="analysisOpen = true">分析</el-button>
          </div>
        </div>
        <div v-loading="loading" class="tableDiv">
          <el-table :show-summary="false" :max-height="viewListHeight" :summary-method="getSummaries" tooltip-effect="darkTable" :data="dealBaseList" class="nowrapTable showOnlyLine sortTable table" border @sort-change="dataSort">
            <!-- eslint-disable -->
            <el-table-column
              v-for="(item, index) in showFieldList"
              v-if="item.isShow === 'Y' && item.fieldName !== '是否关注'"
              :key="index"
              sortable="custom"
              :min-width="item.width"
              :label="$t(item.fieldRemark)"
              :prop="item.fieldName"
              show-overflow-tooltip
              :fixed="item.isShow === 'Y' && item.isFixed === 'Y'"
            >
              <template slot="header">
              <span class="fieldName">
                <p :title="$t(item.fieldRemark)">{{ $t(item.fieldRemark) }}</p>
              </span>
                <fieldQuery group-hidden :field-val="item" @queryData="getQueryData" @group="groupData" />
              </template>
              <template slot-scope="scope">
                <div v-if="item.fieldName === '项目名称'" class="focusTit">
                  <Focus @change="starChange" :source-id="scope.row['项目ID']" :focus="scope.row['是否关注']" :source-name="scope.row['项目名称']" focus-type="deal" />
                  <router-link
                    v-if="scope.row['标的公司ID'] !== undefined"
                    target="_blank"
                    :to="{path:'/deal/home/dealBaseHome',query:{id:scope.row['项目ID'],dealType: dealType, companyId:scope.row['标的公司ID'],menuKey: menuKey, showType: 'deal'}}"
                    class="link_a"
                    @click.native="recorePath({ fromPath: $route.fullPath, path:'/deal/home/dealBaseHome',query:{id:scope.row['项目ID'],dealType: dealType, companyId:scope.row['标的公司ID'],menuKey: menuKey, showType: 'deal'}})"
                  >
                    {{ $t(scope.row['项目名称']) }}
                  </router-link>

                  <router-link
                    v-if="scope.row['融资方ID'] !== undefined"
                    target="_blank"
                    :to="{path:'/deal/home/dealBaseHome',query:{id:scope.row['项目ID'],dealType: dealType, companyId:scope.row['融资方ID'],menuKey: menuKey, showType: 'deal'}}"
                    class="link_a"
                    @click.native="recorePath({ fromPath: $route.fullPath, path:'/deal/home/dealBaseHome',query:{id:scope.row['项目ID'],dealType: dealType, companyId:scope.row['融资方ID'],menuKey: menuKey, showType: 'deal'}})"
                  >
                    {{ $t(scope.row['项目名称']) }}
                  </router-link>

                  <router-link
                    v-if="scope.row['工商ID'] !== undefined"
                    target="_blank"
                    :to="{path:'/deal/home/dealBaseHome',query:{id:scope.row['项目ID'],dealType: dealType, gpId:scope.row['管理公司ID'], companyId:scope.row['工商ID'],menuKey: menuKey, showType: 'deal'}}"
                    class="link_a"
                    @click.native="recorePath({ fromPath: $route.fullPath, path:'/deal/home/dealBaseHome',query:{id:scope.row['项目ID'],dealType: dealType, gpId:scope.row['管理公司ID'], companyId:scope.row['工商ID'],menuKey: menuKey, showType: 'deal'}})"
                  >
                    {{ $t(scope.row['项目名称']) }}
                  </router-link>
                </div>
                <div v-else-if="item.fieldName === '子基金名称'">
                  <router-link
                    v-if="scope.row['标的公司ID'] !== undefined"
                    target="_blank"
                    :to="{path:'/deal/home/dealBaseHome',query:{id:scope.row['项目ID'],dealType: dealType, companyId:scope.row['标的公司ID'],menuKey: menuKey, showType: 'deal'}}"
                    class="link_a"
                    @click.native="recorePath({ fromPath: $route.fullPath, path:'/deal/home/dealBaseHome',query:{id:scope.row['项目ID'],dealType: dealType, companyId:scope.row['标的公司ID'],menuKey: menuKey, showType: 'deal'}})"
                  >
                    {{ $t(scope.row['子基金名称']) }}
                  </router-link>
                </div>

                <router-link
                  v-else-if="item.fieldName === '标的公司名称'"
                  target="_blank"
                  :to="{path:'/company/base/companyBaseHome',query:{companyId:scope.row.标的公司ID}}"
                  class="link_a"
                  @click.native="recorePath({ fromPath: $route.fullPath, path:'/company/base/companyBaseHome',query:{companyId:scope.row.标的公司ID}})"
                >
                  {{ $t(scope.row['标的公司名称']) }}
                </router-link>
                <router-link
                  v-else-if="item.fieldName === '公司名称'"
                  target="_blank"
                  :to="{path:'/company/base/companyBaseHome',query:{companyId:scope.row.标的公司ID}}"
                  class="link_a"
                  @click.native="recorePath({ fromPath: $route.fullPath, path:'/company/base/companyBaseHome',query:{companyId:scope.row.标的公司ID}})"
                >
                  {{ $t(scope.row['公司名称']) }}
                </router-link>
                <router-link
                  v-else-if="item.fieldName === '基金名称'"
                  target="_blank"
                  :to="{path:'/company/base/companyBaseHome',query:{companyId:scope.row.工商ID}}"
                  class="link_a"
                  @click.native="recorePath({ fromPath: $route.fullPath, path:'/company/base/companyBaseHome',query:{companyId:scope.row.工商ID}})"
                >
                  {{ $t(scope.row['基金名称']) }}
                </router-link>
                <router-link
                  v-else-if="item.fieldName === '融资方名称'"
                  target="_blank"
                  :to="{path:'/company/base/companyBaseHome',query:{companyId:scope.row.融资方ID}}"
                  class="link_a"
                  @click.native="recorePath({ fromPath: $route.fullPath, path:'/company/base/companyBaseHome',query:{companyId:scope.row.融资方ID}})"
                >
                  {{ $t(scope.row['融资方名称']) }}
                </router-link>
                <router-link
                  v-else-if="item.fieldName === '发行方名称'"
                  target="_blank"
                  :to="{path:'/company/base/companyBaseHome',query:{companyId:scope.row.发行方ID}}"
                  class="link_a"
                  @click.native="recorePath({ fromPath: $route.fullPath, path:'/company/base/companyBaseHome',query:{companyId:scope.row.发行方ID}})"
                >
                  {{ $t(scope.row['发行方名称']) }}
                </router-link>
                <div v-else style="overflow: hidden;text-overflow: ellipsis;">
                  <span v-if="moneyList.includes(item.fieldName)" class="money-text">{{ $t(scope.row[item.fieldName]) }}</span>
                  <el-button v-else-if="item.fieldName === '最新进展'" type="text" style="padding: 0" @click="openTrack(scope.row['项目ID'])">{{ scope.row[item.fieldName] && scope.row[item.fieldName] !== '--' ? $t(formatHtml(scope.row[item.fieldName])) : $t('新增') }}</el-button>
                  <span v-else>{{ $t(scope.row[item.fieldName]) }}</span>
                </div>
              </template>
            </el-table-column>
            <el-table-column :label="$t('操作')" align="center" fixed="right" class-name="small-padding fixed-width" width="120">
              <template slot="header">
                <i class="el-icon-s-tools" style="display: inline-block;margin: 0 auto!important;" @click="fieldChange(viewId)" />
              </template>
              <template slot-scope="scope">
                <el-tooltip class="item" effect="dark" :content="$t('修改项目')">
                  <el-button type="text" size="small" v-if="dealType === 'property'" v-hasPermi="['deal:dealbase:edit']" @click.native="showMore(scope.row,dealType,'dealEdit')" icon="el-icon-edit-outline" />
                  <el-button type="text" size="small" v-else-if="dealType === 'lease'" v-hasPermi="['deal:dealbase:edit']" @click.native="showMore(scope.row,dealType,'dealEdit')" icon="el-icon-edit-outline" />
                  <el-button type="text" size="small" v-else-if="dealType === 'securities'"
                             v-hasPermi="['deal:dealbase:edit']"
                             @click.native="showMore(scope.row,dealType,'dealEdit')" icon="el-icon-edit-outline" />

                  <el-button type="text" size="small"
                             v-hasPermi="['deal:dealbase:edit']"
                             @click.native="showMore(scope.row,'default','dealEdit')" icon="el-icon-edit-outline" />

                </el-tooltip>

                <el-tooltip class="item" effect="dark" :content="$t('项目文档')">
                  <el-button type="text"
                             v-hasPermi="['deal:dealbase:view']"
                             @click.native="showMore(scope.row,'doc','doc')" size="small" icon="el-icon-document" />
                </el-tooltip>

                <el-tooltip class="item" effect="dark" :content="$t('团队成员')">
                  <el-button type="text"
                             v-hasPermi="['deal:team:view']"
                             @click.native="showMore(scope.row,'team','teamEdit')" size="small" icon="el-icon-user" />
                </el-tooltip>

                <el-tooltip class="item" effect="dark" :content="$t('删除项目')">
                  <el-button type="text" size="small" icon="el-icon-delete"
                             v-hasPermi="['deal:dealbaseList:remove']"
                             @click.native="showMore(scope.row,'remove','remove')" />
                </el-tooltip>
              </template>
            </el-table-column>
          </el-table>

          <pagination
            ref="pagination"
            v-show="total>0"
            :total="total"
            :page.sync="queryParams.pageNum"
            :limit.sync="queryParams.pageSize"
            :parameter="true"
            @pagination="getList"
            @currentChange="currentChange"
            style="padding: 0 !important;"
          />
          <!-- parameter只项目、基金用到 -->
        </div>
      </div>
    </div>

    <!-- 添加或修改项目基本信息对话框 -->
    <el-dialog
      :title="$t('项目基本信息')"
      :width="dealBaseFormFlag ? undefined : '70%'"
      :visible.sync="formOpen"
      :close-on-click-modal="false"
      :lock-scroll="false"
      :destroy-on-close="dealBaseFormFlag==='configForm' || dealBaseFormFlag==='form'"
      :custom-class="dealBaseFormFlag==='form' ? 'magicalForm' : 'dialogForm'"
    >
      <Form v-if="dealBaseFormFlag==='form'" ref="form" :form-id-prop="formId" />
      <onlineForm v-else-if="dealBaseFormFlag==='configForm' && this.configFormDealType(dealType)" ref="onlineForm" cut-off-type="deal" />
      <dealBaseForm v-else ref="dealBaseForm" />
    </el-dialog>

    <!-- 持有型业务 -->
    <el-dialog :title="$t('项目基本信息')" :width="dealBaseFormFlag ? undefined : '70%'" :visible.sync="formPropertyOpen" :close-on-click-modal="false" :lock-scroll="false" :destroy-on-close="dealBaseFormFlag==='configForm'" :custom-class="dealBaseFormFlag==='form' ? 'magicalForm' : 'dialogForm'">
      <dealBasePropertyForm ref="dealBasePropertyForm" />
    </el-dialog>
    <!-- 租赁项目 -->
    <el-dialog :title="$t('项目基本信息')" :width="dealBaseFormFlag ? undefined : '70%'" :visible.sync="formLeaseOpen" :close-on-click-modal="false" :lock-scroll="false" :destroy-on-close="dealBaseFormFlag==='configForm'" :custom-class="dealBaseFormFlag==='form' ? 'magicalForm' : 'dialogForm'">
      <dealBaseLeaseForm ref="dealBaseLeaseForm" />
    </el-dialog>
    <!-- 证券投资基金 -->
    <el-dialog :title="$t('项目基本信息')" :width="dealBaseFormFlag ? undefined : '70%'" :visible.sync="formSecuritiesOpen" :close-on-click-modal="false" :lock-scroll="false" :destroy-on-close="dealBaseFormFlag==='configForm'" :custom-class="dealBaseFormFlag==='form' ? 'magicalForm' : 'dialogForm'">
      <dealBaseSecuritiesForm ref="dealBaseSecuritiesForm" />
    </el-dialog>

    <!-- 导入窗口 -->
    <el-dialog :title="$t('导入')" :visible.sync="upload.open" width="400px" :close-on-click-modal="false" :lock-scroll="false">
      <div>
        <el-upload
          ref="upload"
          v-loading="upload.isUploading"
          :limit="1"
          accept=".xlsx, .xls"
          :headers="upload.headers"
          :action="upload.url"
          :disabled="upload.isUploading"
          :on-progress="handleFileUploadProgress"
          :on-success="handleFileSuccess"
          :on-exceed="handleFileExceed"
          :on-change="handleFileChange"
          :auto-upload="false"
          drag
        >
          <i class="el-icon-upload" />
          <div class="el-upload__text">
            {{ $t('将文件拖到此处，或') }}
            <em>{{ $t('点击上传') }}</em>
          </div>
          <div slot="tip" class="el-upload__tip" style="color:red">
            {{ $t('提示：仅允许导入“xls”或“xlsx”格式文件！') }}
            <el-link type="primary" style="font-size:12px" @click="fetchTemplate">
              {{ $t('下载模板') }}
            </el-link>
          </div>
        </el-upload>

        <div slot="footer" class="dialog-footer" style="text-align: right;">
          <el-button @click="upload.open = false">{{ $t("取消") }}</el-button>
          <el-button type="primary" @click="submitFileForm">{{ $t("确定") }}</el-button>
        </div>
      </div>
    </el-dialog>
    <!-- 新建视图 -->
    <el-dialog v-el-drag-dialog :title="$t('新建视图')" :visible.sync="newView" width="70%" :close-on-click-modal="false" :lock-scroll="false" custom-class="dialogForm">
      <sysSearchMainForm ref="sysSearchMainForm" :module="searchKey" />
    </el-dialog>
    <!-- 管理视图 -->
    <el-dialog v-el-drag-dialog :title="$t('管理视图')" :visible.sync="oddView" width="50%" :close-on-click-modal="false" :lock-scroll="false" :before-close="handleDialogClose">
      <sysSearchMainList ref="sysSearchMainList" :module="searchKey" :view-id="viewId" />
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="$t('保存视图')" :visible.sync="saveViewOpen" width="50%" :close-on-click-modal="false" :lock-scroll="false">
      <div>
        <el-form ref="saveForm" :model="saveForm" :rules="saveViewRules">
          <el-form-item :label="$t('视图名称')" prop="name">
            <el-input v-model="saveForm.name" :placeholder="$t('视图名称')" />
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: right;">
          <el-button @click="cancel">{{ $t("取消") }}</el-button>
          <el-button type="primary" @click="saveView">{{ $t("确定") }}</el-button>
        </div>
      </div>
    </el-dialog>
    <!-- fieldShow -->
    <el-dialog v-el-drag-dialog :title="$t('展示字段(字段可拖拽排序)')" :visible.sync="fieldShow" width="50%" :close-on-click-modal="false" :lock-scroll="false" :before-close="handleDialogClose" custom-class="dialogForm">
      <fieldShow ref="fieldShow" />
    </el-dialog>
    <!-- 文档库 -->
    <el-dialog v-if="fileFolderOpen" :title="$t('文档库')" :visible.sync="fileFolderOpen" :destroy-on-close="true" :close-on-click-modal="false" custom-class="folderOpen" :lock-scroll="false" append-to-body>
      <file-folder ref="fileFolder" :folder-bus-type="folderBusType" :folder-bus-id="businessDealId" />
    </el-dialog>
    <!-- 项目成员 -->
    <el-dialog :title="$t('团队成员')" :visible.sync="dealTeamOpen" :close-on-click-modal="false" custom-class="folderOpen" :lock-scroll="false" append-to-body>
      <dealTeamList ref="dealTeamList" :deal-id="businessDealId" />
    </el-dialog>
    <!-- 高级查询 -->
    <el-dialog :title="$t('高级条件查询')" :width="dealBaseFormFlag ? undefined : '70%'" :visible.sync="advanceOpen" :close-on-click-modal="false" :lock-scroll="false" :destroy-on-close="dealBaseFormFlag==='configForm'" :custom-class="dealBaseFormFlag==='form' ? 'magicalForm' : 'dialogForm'">
      <query @resetQuery="resetQuery" :queryConditions="queryConditions" :queryParams="queryParams" @search="querySearch" />
    </el-dialog>

    <!-- 分析 -->
    <el-dialog :title="$t('分析面板')" v-if="analysisOpen" :width="dealBaseFormFlag ? undefined : '100%'" :visible.sync="analysisOpen" :close-on-click-modal="false" :lock-scroll="false" :destroy-on-close="dealBaseFormFlag==='configForm'" :custom-class="dealBaseFormFlag==='form' ? 'magicalForm' : 'dialogForm'">
      <deal-analysis />
    </el-dialog>

    <el-drawer
      :visible.sync="trackOpen"
      direction="rtl"
      :before-close="handleClose"
      append-to-body
      :show-close="false"
      :with-header="false"
      :modal="false"
    >
      <div class="readOver track">
        <el-form ref="trackForm" v-loading="trackLoading" :model="trackForm" :rules="trackFormRules" class="dataForm trackForm">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item :label="$t('发生时间')" prop="happenTime">
                <DatePicker v-model="trackForm.happenTime" :placeholder="$t('发生时间')" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('事项类型')" prop="itemType">
                <dictSelect
                  ref="dict"
                  v-model="trackForm.itemType"
                  :clearable="true"
                  :is-check="true"
                  dictionary="item_type"
                  @change="onchangeItemType"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('跟踪方式')" prop="trackMode">
                <dictSelect
                  v-model="trackForm.trackMode"
                  :clearable="true"
                  dictionary="track_mode"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('关注等级')" prop="levelConcern">
                <el-select v-model="trackForm.levelConcern" :placeholder="$t('关注等级')" clearable @change="levelOnChange">
                  <el-option
                    v-for="dict in levelConcernOptions"
                    :key="dict.dictValue"
                    :label="$t(dict.dictLabel)"
                    :value="dict.dictValue"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item :label="$t('对方人员')" prop="otherPeople" :rules="[{required: isRequired,message:$t('必填信息'),trigger:'blur'}]">
                <el-input v-model="trackForm.otherPeople" maxlength="120" show-word-limit :placeholder="$t('对方人员')" />
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item :label="$t('最新进展')" prop="details">
                <EditorTxt v-if="trackOpen" v-model="trackForm.details" class="editTxt" :height="450" :placeholder="$t('最新进展')" />
              </el-form-item>
            </el-col>
          </el-row>
          <div style="text-align: right;">
            <el-button type="primary" size="small" @click="saveTrack">{{ $t('保存') }}</el-button>
          </div>
        </el-form>
        <div class="track-line mt15">
          <div class="title">{{ $t('跟踪记录') }}</div>
          <div v-loading="lineLoading" class="line-content">
            <ul>
              <li v-for="(item,index) in trackList" :key="item.id">
                <div class="card">
                  <div class="content">
                    <div :ref="'text-parent-' + item.id" :style="item.expend ? 'overflow:visible;display:block;' : 'overflow:hidden;max-height: 115px;'" class="line-info line-text">
                      <span :ref="'text-child-' + item.id" class="text" v-html="item.details" />
                      <div v-if="item.expandShow" class="btn">
                        <el-button type="text" @click="expandTrack(item)">{{ $t(!item.expend ? '展开' : '收起') }}</el-button>
                      </div>
                    </div>
                    <div class="tag">
                      <el-tag v-if="item.itemType" class="itemType" size="small">{{ selectDictLabel(itemTypeOptions,item.itemType) ? selectDictLabel(itemTypeOptions,item.itemType) : item.itemType }}</el-tag>
                      <el-tag v-if="item.trackMode" class="trackMode" size="small">{{ selectDictLabel(trackModeOptions,item.trackMode) ? selectDictLabel(trackModeOptions,item.trackMode) : item.trackMode }}</el-tag>
                    </div>
                    <div class="userInfo">
                      <div class="nickName">{{ item.user.nickName }}</div>
                      <div class="time">{{ parseTime(item.happenTime) }}</div>
                    </div>
                    <template v-if="item.fileList.length>0">
                      <div class="otherFile"><span>附件:</span>
                        <div class="file">
                          <p v-for="file in item.fileList" :key="file.id" class="click_file">
                            <span class="link-type" @click.stop="onlinePreview(file.id)">{{ file.name }}</span>
                            <span class="link-type" @click.stop="download(file.id)"><i class="el-icon-download" :title="$t('下载')" /></span>
                          </p>
                        </div>
                      </div>
                    </template>
                  </div>
                </div>
              </li>
            </ul>
<!--        使用element ui的空状态进行展示   -->
            <el-empty v-if="!trackList.length" description="暂无数据" :image-size="100" />
          </div>
        </div>
      </div>
    </el-drawer>
    <OnlinePreview ref="OnlinePreview" />
  </div>
</template>
<script>
  import dealTeamList from '@/views/deal/team/dealTeamList.vue'
  import fileFolder from '@/views/folder/index.vue'
  import sysSearchMainForm from '../../system/search/sysSearchMainForm'
  import sysSearchMainList from '../../system/search/sysSearchMainList'
  import fieldQuery from '../../system/search/fieldQuery'
  import fieldShow from '../../system/search/fieldShow'
  import dealBaseLeaseForm from '@/views/deal/base/lease/dealBaseLeaseForm.vue'
  import { delDealBase, reSaveDealBase, getDealBase } from '@/api/base/deal/dealBase'
  import { getByUser, viewSave } from '@/api/system/search/searchMainView'
  import { exportDealBase, getDataListByView } from '@/api/deal/newDealList/dealList'
  import { getToken } from '@/utils/auth'
  import Focus from '@/components/Focus/star'
  import Form from '@/views/dev/form/base/form'
  import { getConfigKey } from '@/api/system/config'
  import dealBaseForm from './dealBaseForm.vue'
  import dealBasePropertyForm from '@/views/deal/base/dealBasePropertyForm.vue'
  import onlineForm from '@/views/system/desform/release/onlineForm.vue'
  import dealBaseSecuritiesForm from '@/views/deal/base/securities/dealBaseSecuritiesForm.vue'
  import { config } from '@/utils'
  import { getPermission } from '@/api/system/dealRole/dealRole'
  import Query from '@/components/Query'
  import { getGroupField, getGroupValue, getTagGroupListValue, getTagGroupValue } from '@/api/deal/newDealList/dealList'
  import EditorTxt from '@/components/Tinymce'
  import { saveDealTrack } from '@/api/deal/track/dealTrack'
  import { listTrack } from '@/api/deal/statistics/dealStatistics'
  import DealAnalysis from '@/views/deal/base/analysis/dealAnalysis.vue'
  import innerHeight from '@/mixins/innerHeight'
  import { downLoadFileOpen } from '@/utils/zipdownload'
  export default {
    components: {
      DealAnalysis,
      EditorTxt,
      fieldShow,
      fieldQuery,
      sysSearchMainList,
      sysSearchMainForm,
      Focus,
      Form,
      dealBaseForm,
      fileFolder,
      dealTeamList,
      dealBasePropertyForm,
      onlineForm,
      dealBaseSecuritiesForm,
      dealBaseLeaseForm,
      Query
    },
    mixins: [innerHeight],
    data() {
      return {
        // 菜单标识-用来查询项目内菜单
        data: [],
        trackForm: {
          details: undefined
        },
        trackList: [],
        lineLoading: false,
        trackLoading: false,
        menuKey: '',
        dealSum: {},
        moneyList: [],
        advanceOpen: false,
        trackOpen: false,
        // 高级查询的key
        searchKey: '',
        // 项目状态
        dealStatus: this.$route.query.dealStatus,
        // 项目状态
        dealType: '',
        // 是否打开分析
        analysisOpen: false,
        hasPermiBtn: 'deal:dealbase:' + (this.isEmpty(this.$route.query.dealType) ? '' : this.$route.query.dealType.toLowerCase()) + 'add',
        hasPermiExportBtn: 'deal:dealbase:' + (this.isEmpty(this.$route.query.dealType) ? '' : this.$route.query.dealType.toLowerCase()) + 'export',
        hasPermiImportBtn: 'deal:dealbase:' + (this.isEmpty(this.$route.query.dealType) ? '' : this.$route.query.dealType.toLowerCase()) + 'import',
        selected: false,
        oddView: false,
        newView: false,
        fieldShow: false,
        dealTeamOpen: false,
        // 遮罩层
        loading: true,
        // 总条数
        total: 0,
        // 项目基本信息表格数据
        dealBaseList: [],
        showFieldList: [],
        // 是否显示弹出层
        formOpen: false,
        formPropertyOpen: false,
        // 租赁项目弹出层
        formLeaseOpen: false,
        // 证券基金投资
        formSecuritiesOpen: false,
        // 查询参数
        queryParams: {
          pageNum: 1,
          pageSize: 10,
          dealType: this.$route.query.dealType,
          tagConfigId: undefined,
          tagId: undefined,
          // 查询产生集合
          paramsMap: {
          },
          searchOrderByVo: {
            prop: '',
            order: ''
          },
          // 基础查询
          dealName: undefined,
          // 分组类型
          groupFieldType: undefined,
          // 分组值
          groupFieldValue: undefined
        },
        listSysSearch: [],
        // 表单参数
        form: {},
        // 表单校验
        rules: {},
        viewId: '',
        activeItem: '',
        searchQueryList: [],
        // 项目导入参数
        upload: {
          // 是否显示弹出层（项目导入）
          open: false,
          // 弹出层标题（项目导入）
          title: '',
          // 是否禁用上传
          isUploading: false,
          // 设置上传的请求头部
          headers: { Authorization: 'Bearer ' + getToken() },
          // 上传的地址
          url: process.env.VUE_APP_BASE_API + '/deal/dealBase/importData'
        },
        formId: this.$route.query.formId,
        dealBaseFormFlag: '',
        easyddEnable: false,
        fileFolderOpen: false,
        folderBusType: undefined,
        businessDealId: undefined,
        menuLoading: false,
        dealBaseFormTempletId: '',
        groupField: undefined,
        group: {},
        treeLoading: true,
        saveViewOpen: false,
        saveForm: {
          name: undefined
        },
        saveViewRules: {
          name: [{ required: true, message: this.$t('必填信息'), trigger: ['change', 'blur'] }]
        },
        showSaveBtn: false,
        // 选择的标签标识
        tagKey: undefined,
        queryConditions: [
          {
            prop: 'levelConcern',
            placeholder: '关注等级',
            label: '关注等级',
            component: 'select',
            format: 'dict',
            dictData: 'level_concern'
          },
          {
            prop: 'dealStatus',
            placeholder: '项目状态',
            label: '项目状态',
            component: 'select',
            format: 'dict',
            dictData: 'deal_status'
          },
          {
            prop: 'dealSource',
            placeholder: '项目来源',
            label: '项目来源',
            component: 'input',
            format: '',
            dictData: ''
          },
          {
            prop: 'round',
            placeholder: '轮次',
            label: '轮次',
            component: 'select',
            format: 'dict',
            dictData: 'rounds_investment',
            isHide: this.$route.query.dealType !== 'equity'
          },
          {
            prop: 'investmentType',
            placeholder: '投资类型',
            label: '投资类型',
            component: 'select',
            format: 'dataSource',
            dictData: 'investmentType'
          },
          {
            prop: 'focusOn',
            placeholder: '聚焦行业',
            label: '聚焦行业',
            component: 'select',
            format: 'dataSource',
            dictData: 'focusOn',
            isHide: this.$route.query.dealType !== 'equity'
          },
          {
            prop: 'province',
            placeholder: '省',
            label: '省',
            component: 'select',
            format: 'dataSource',
            dictData: 'province'
          },
          {
            prop: 'city',
            placeholder: '市',
            label: '市',
            component: 'select',
            format: 'dataSourceUnion',
            dictData: 'city',
            unionField: 'province'
          },
          {
            prop: 'trackUser',
            placeholder: '跟踪人',
            label: '跟踪人',
            component: 'user',
            format: ''
          },
          {
            prop: 'trackDept',
            placeholder: '跟踪部门',
            label: '跟踪部门',
            component: 'dept',
            format: ''
          },
          {
            prop: 'createUser',
            placeholder: '创建人',
            label: '创建人',
            component: 'user',
            format: ''
          },
          {
            prop: 'createDept',
            placeholder: '创建部门',
            label: '创建部门',
            component: 'dept',
            format: ''
          },
          {
            prop: 'personCharge',
            placeholder: '负责人',
            label: '负责人',
            component: 'user',
            format: ''
          },
          {
            prop: 'personChargeDept',
            placeholder: '所属部门',
            label: '所属部门',
            component: 'dept',
            format: ''
          }
        ],
        queryGroupFieldList: [],
        groupValueList: [],
        selectGroup: '',
        itemTypeOptions: [],
        trackModeOptions: [],
        // 防抖定时器
        timer: null,
        // 展开列表
        expendList: [],
        levelConcernOptions: [],
        // 表单校验
        trackFormRules: {
          happenTime: [
            { required: true, message: this.$t('必填信息'), trigger: ['blur', 'change'] }
          ],
          itemType: [
            { required: true, message: this.$t('必填信息'), trigger: ['blur', 'change'] }
          ],
          trackMode: [
            { required: true, message: this.$t('必填信息'), trigger: ['blur', 'change'] }
          ],
          levelConcern: [
            { required: true, message: this.$t('必填信息'), trigger: ['blur', 'change'] }
          ],
          details: [
            { required: true, message: this.$t('必填信息'), trigger: ['blur', 'change'] }
          ]
        },
        isRequired: false // 对方人员是否必填
      }
    },
    computed: {
      leftHeight() {
        return this.innerHeight - 350
      },
      viewListHeight() {
        return this.innerHeight - 390
      },
      getConditionCount() {
        var sum = 0
        this.queryConditions.forEach(item => {
          if (this.queryParams[item.prop]) {
            sum++
          }
        })
        return sum
      }
    },
    watch: {
      '$route': {
        handler(val) {
          this.searchKey = val.query.searchKey
          this.menuKey = val.query.menuKey
          this.dealStatus = val.query.dealStatus
          this.dealType = val.query.dealType
          this.upload.headers.dealType = this.dealType || 'equity'
          // 母基金直投项目, 子基金
          if (val.query.paramsMap && val.query.paramsMap.investorId !== undefined) {
            this.queryParams.paramsMap = { investorId: val.query.paramsMap.investorId }
          }
          this.load(this.searchKey)
        },
        deep: true,
        immediate: true
      }
    },
    created() {
      var pageSize = Number(this.$store.state.app.pageSize)
      if (pageSize > 0) {
        this.queryParams.pageSize = pageSize
      }
      getConfigKey('easydd').then(res => {
        // console.log(res)
        this.easyddEnable = (res.msg === 'true')
      })
      this.getDicts('item_type').then(res => {
        this.itemTypeOptions = res.data
      })
      this.getDicts('track_mode').then(res => {
        this.trackModeOptions = res.data
      })
      // 关注等级
      this.getDicts('level_concern').then(response => {
        this.levelConcernOptions = response.data
      })
      this.$nextTick(() => {
        getConfigKey('deal_base_form').then(res => {
          this.dealBaseFormFlag = res.msg
        })
      })
      getConfigKey('dealTempletId').then((res) => {
        this.dealBaseFormTempletId = res.msg
      })
      getGroupField().then(res => {
        if (this.$route.query.dealType !== 'equity') {
          var arr = ['industry', 'investType']
          res.data = res.data.filter(item => !arr.includes(item.dictValue))
        }

        this.queryParams.groupFieldType = res.data[0].dictValue
        this.queryGroupFieldList = res.data
      })
    },
    mounted() {
    },
    methods: {
      treeClickHandler(data) {
        if (!data.configId) {
          this.expendList = [data.value]
        }
      },
      starChange() {
        this.updateView()
      },
      // 获取左侧分组数据
      getGroupValue() {
        if (this.queryParams.groupFieldType === 'tag') {
          getTagGroupValue(this.$route.query.dealType, this.queryParams.viewId, this.queryParams).then(res => {
            this.groupValueList = res.data
          })
        } else {
          var groupFieldType = this.queryParams.groupFieldType || 'stage'
          getGroupValue(this.$route.query.dealType, groupFieldType, this.queryParams.viewId, this.queryParams).then(res => {
            this.groupValueList = res.data
          })
        }
      },
      // 分组类型改变时
      changeGroupFieldType() {
        this.queryParams.groupFieldValue = undefined
        this.tagKey = undefined
        this.queryParams.tagConfigId = undefined
        this.queryParams.tagId = undefined
        this.queryParams.level = undefined
        this.getGroupValue()
      },
      // 选中分组
      selectedGroup(groupValue) {
        if (this.loading) {
          return
        }
        if (this.queryParams.groupFieldValue === groupValue) {
          this.queryParams.groupFieldValue = undefined
        } else {
          this.queryParams.groupFieldValue = groupValue
        }
        this.getList()
      },
      // 标签树节点懒加载
      lazyLoadTree(node, resolve) {
        // getTagGroupValue(this.$route.query.dealType, this.queryParams.viewId).then(res => {
        //   this.groupValueList = res.data
        // })
        if (node.level > 0) {
          getTagGroupListValue({
            viewId: this.viewId,
            parentId: node.data.value,
            level: node.data.level
          }).then(res => {
            resolve(res.data)
          })
        }
      },
      // 处理点击标签
      clickTagHandler(data) {
        if (this.loading) {
          return
        }
        if (data.configId) {
          var tagKey = data.configId + '_' + data.value
          if (tagKey === this.tagKey) {
            this.tagKey = undefined
            this.queryParams.tagConfigId = undefined
            this.queryParams.tagId = undefined
            this.queryParams.level = undefined
          } else {
            this.tagKey = data.configId + '_' + data.value
            this.queryParams.tagConfigId = data.configId
            this.queryParams.tagId = data.value
            this.queryParams.level = data.level
          }
          this.getList()
        }
      },
      levelOnChange(ev) {
        this.$set(this.trackForm, 'levelConcern', ev)
        this.$forceUpdate()
      },
      // 打开跟踪进展
      openTrack(dealId) {
        getDealBase(dealId).then(response => {
          var levelConcern = response.data && response.data.levelConcern ? response.data.levelConcern : 'B'
          this.$set(this.trackForm, 'levelConcern', levelConcern)
          this.trackFormRules.levelConcern = [
            { required: false, message: this.$t('必填信息'), trigger: ['blur', 'change'] }
          ]
          this.$forceUpdate()
        })
        this.trackOpen = true
        this.trackForm.dealId = dealId
        // this.trackForm.itemType = 'XMGZJZ'
        // this.onchangeItemType(this.trackForm.itemType)
        // this.trackForm.trackMode = 'QT'
        this.trackForm.happenTime = this.parseTime(new Date(), '{y}-{m}-{d}')
        // getDealTrack(dealId).then(res => {
        //   console.log(111, res)
        // })
        listTrack(dealId).then(res => {
          this.trackList = res.rows
          this.trackList.forEach(item => {
            this.$set(item, 'expend', false)
            this.$nextTick(() => {
              var parent = this.$refs['text-parent-' + item.id] && this.$refs['text-parent-' + item.id].length > 0 ? (this.$refs['text-parent-' + item.id])[0].scrollHeight : 0
              var child = this.$refs['text-parent-' + item.id] && this.$refs['text-parent-' + item.id].length > 0 ? (this.$refs['text-parent-' + item.id])[0].clientHeight : 0
              // console.log(parent, child)
              if (parent > child) {
                this.$set(item, 'expandShow', true)
              }
            })
          })
        })
      },
      // 处理跟踪弹窗
      handleClose() {
        this.trackOpen = false
      },
      // 保存项目跟踪
      saveTrack() {
        // this.trackForm.itemType = 'XMGZJZ'
        // this.trackForm.trackMode = 'QT'
        // this.trackForm.happenTime = this.parseTime(new Date(), '{y}-{m}-{d}')
        this.$refs.trackForm.validate(valid => {
          if (valid) {
            this.trackLoading = true
            saveDealTrack(this.trackForm).then(res => {
              if (res.code === 200) {
                this.trackOpen = false
                this.$message.success(this.$t('保存成功'))
                this.trackForm = {
                  details: undefined
                }
                this.trackLoading = false
                this.getList()
              }
              this.trackLoading = false
            })
          }
        })
      },
      resetQuery() {
        var paramsMap = this.queryParams.paramsMap
        var searchOrderByVo = this.queryParams.searchOrderByVo
        var dealName = this.queryParams.dealName
        var groupFieldType = this.queryParams.groupFieldType
        var groupFieldValue = this.queryParams.groupFieldValue
        var tagId = this.queryParams.tagId
        var tagConfigId = this.queryParams.tagConfigId

        this.queryParams = {
          pageNum: 1,
          pageSize: this.queryParams.pageSize,
          dealType: this.$route.query.dealType,
          viewId: this.viewId,
          // 查询产生集合
          paramsMap,
          searchOrderByVo,
          // 基础查询
          dealName,
          // 分组类型
          groupFieldType,
          // 分组值
          groupFieldValue,
          tagId,
          tagConfigId
        }
      },
      showMore(row, eventType, permission) {
        getPermission(row['项目ID'], 'deal', 'deal_' + this.$route.query.dealType).then(res => {
          if (res.data) {
            var arr = res.data.hasPerm
            // var menus = res.data.menus[0].children
            var isNewMenu = Boolean(res.data.isNewMenu)
            var menuResult = !isNewMenu ? res.data.menus[0].children.find(item => item.menuKey === 'deal_data_after') : res.data.menus

            if (!menuResult) {
              this.$message.error(this.$t('暂无权限'))
              return
            }
            if (permission === 'dealEdit' && !arr.includes('deal:dealbase:edit')) {
              this.$message.error(this.$t('暂无项目编辑权限'))
              return
            } else if (permission === 'remove' && !arr.includes('deal:dealbase:remove')) {
              this.$message.error(this.$t('暂无项目删除权限'))
              return
            } else if (permission === 'teamEdit' && !arr.includes('deal:team:edit')) {
              this.$message.error(this.$t('暂无团队编辑权限'))
              return
            } else if (permission === 'doc' && !arr.includes('deal:doc:view')) {
              this.$message.error(this.$t('暂无文档权限'))
              return
            }
          }

          this.distributeEvent(row, eventType)
          // var result = JSON.parse(JSON.stringify(this.dealBaseList))
          // this.dealBaseList = []
          // this.dealBaseList = result
        })
      },
      distributeEvent(row, eventType) {
        switch (eventType) {
          case 'property':
            this.updatePropertyHandle(row)
            break
          case 'securities':
            this.updateSecuritiesHandle(row)
            break
          case 'lease':
            this.updateLeaseHandle(row)
            break
          case 'default':
            this.updateHandle(row)
            break
          case 'doc':
            this.openFileFolder(row)
            break
          case 'team':
            this.dealTeamHandle(row)
            break
          case 'remove':
            this.deleteHandle(row)
            break
        }
      },
      load(val) {
        this.loading = true
        // 定位勾选视图
        getByUser(val, this.queryParams.paramsMap).then(response => {
          this.listSysSearch = response.data
          // 重置之前的筛选条件
          this.resetQuery()
          this.queryParams.dealName = undefined
          this.queryParams.groupFieldValue = undefined
          if (localStorage.getItem('activeIdDeal') === 'undefined') {
            this.sysSearchActive(response.data[0])
          } else {
            const index = response.data.findIndex(children => children.viewId === localStorage.getItem('activeIdDeal'))
            if (index !== -1) {
              this.sysSearchActive(response.data[index])
            } else {
              this.sysSearchActive(response.data[0])
            }
          }
        })
      },
      calcSum() {
        // getDealSum(this.queryParams).then(res => {
        //   this.dealSum = res.data && res.data.length > 0 ? res.data[0] : null
        //   this.moneyList = []
        //   for (var i in this.dealSum) {
        //     this.moneyList.push(i)
        //   }
        // })
      },
      // 字段查询
      getQueryData(data, isNotLeft = true) {
        if (!(this.searchQueryList instanceof Array)) {
          this.$set(this, 'searchQueryList', [])
        }
        this.$nextTick(() => {
          var searchQueryTempList = []
          this.searchQueryList.forEach(item => {
            if (item.fieldName !== data.fieldName) {
                searchQueryTempList.push(item)
            }
          })
          this.searchQueryList = searchQueryTempList
          if (data.value !== '' || data.conditions !== '') {
            this.searchQueryList.push(data)
          }
          this.queryParams.searchQueryVoList = this.searchQueryList
          // this.getList(this.searchQueryList)
            this.loading = true
            this.dealBaseList = []
            this.calcSum()
            getDataListByView(this.queryParams).then(res => {
              this.dealBaseList = res.data.rows
              this.total = res.data.total
              this.loading = false
              if (this.groupField && this.groupField !== '' && isNotLeft) {
                this.groupData(this.group)
              }
            })
          })
      },
      updateView() { // 只更新视图
        this.getGroupValue()
        getByUser(this.$route.query.searchKey).then(response => {
          this.listSysSearch = response.data
        })
      },
      // 分组
      groupData(e, showSaveBtn = true) {
        // console.log(e)
        // 加载左侧分组树
        this.group = e
        this.showSaveBtn = showSaveBtn
        this.getLeftGroupTree(e)
      },
      handlerClick(data) {
        this.group.conditions = data[data['field']] === null ? 'WK' : 'HDY'
        this.group.value = data[data['field']]
        this.group.group = true
        // console.log(this.searchQueryList, '条件列表')
        // console.log(this.group, data, this.groupField)
        this.getQueryData(this.group, false)
      },
      getSummaries(param) {
        const { columns } = param
        const sums = []
        columns.forEach((column, index) => {
          if (index === 0) {
            sums[index] = '合计'
          }
          if ((this.dealSum && this.dealSum[column.property]) || (this.dealSum && this.dealSum[column.property]) === 0) {
            sums[index] = this.dealSum[column.property]
          }
        })

        return sums
      },
      closeGroup() {
        if (this.groupField) {
          this.showSaveBtn = false
        }
        var queryList = JSON.parse(JSON.stringify(this.searchQueryList))
        queryList.forEach((item, index) => {
          if (item.group) {
            this.searchQueryList.slice(index, 1)
          }
        })
        this.data = []
        this.group = {}
        this.groupField = undefined
      },
      // 获取左侧分组树
      getLeftGroupTree(query) {
        this.treeLoading = true
        this.queryParams.groupField = query.fieldName
        this.calcSum()
        getDataListByView(this.queryParams).then(res => {
          this.data = res.data
          this.groupField = this.queryParams.groupField
          this.queryParams.groupField = undefined
          this.treeLoading = false
        })
      },
      // 保存视图
      saveView() {
        this.$refs.saveForm.validate(valid => {
          if (valid) {
            // 初始化保存对象
            var queryList = JSON.parse(JSON.stringify(this.searchQueryList))
            this.saveForm.color = ''
            this.saveForm.sqlBaseId = this.$route.query.searchKey
            this.saveForm.groupField = this.groupField
            this.saveForm.searchMainGroupList = []
            queryList.forEach(item => {
              item.fieldId = item.fieldName
              item.fieldValue = item.value
            })
            this.saveForm.searchMainGroupList.push({
              relation: 'and',
              groupField: this.groupField,
              searchMainConditionsList: queryList
            })
            this.saveForm.dataId = this.viewId
            viewSave(this.saveForm).then(res => {
              if (res.code === 200) {
                this.$message.success(this.$t('保存成功'))
                this.cancel(res)
                this.load(this.searchKey)
              }
            })
          }
        })
      },
      openSaveView() {
        this.saveViewOpen = true
      },
      // 删除，排序，新增只刷新视图
      getViewList(id) {
        // 查询高级查询列表
        const rows = []
        this.updateView()
        this.listSysSearch.forEach(item => {
          rows.push(item.viewId)
        })
        // 删除当前选中视图，重新定位视图
        if (!rows.includes(localStorage.getItem('activeIdDeal'))) {
          this.sysSearchActive(this.listSysSearch[0])
        }
        // 修改当前视图应刷新列表
        if (id === localStorage.getItem('activeIdDeal')) {
          this.getList()
          this.getGroupValue()
        }
      },
      // 管理视图
      managementView() {
        this.oddView = true
        if (this.$refs.sysSearchMainList) {
          this.$refs.sysSearchMainList.getList()
        }
      },
      // 新建视图
      addView() {
        this.newView = true
        if (this.$refs.sysSearchMainForm) {
          this.$refs.sysSearchMainForm.init()
        }
      },
      // 弹窗关闭按钮
      handleDialogClose() {
        this.oddView = false
        this.fieldShow = false
        this.getViewList()
      },
      // 查询项目
      sysSearchActive(data) {
        if (data?.viewId !== undefined) {
          this.activeItem = this.viewId = data.viewId
          localStorage.setItem('activeIdDeal', data.viewId)
          this.$nextTick(function() {
            // 项目列表
            this.queryParams.viewId = data.viewId
            this.searchQueryList = []
            this.queryParams.searchQueryVoList = []
            this.getList(undefined, data.searchQueryVoList)
            // 初始化左侧列表
            this.getGroupValue()
          })
        }
      },
      formatHtml(htmlStr) {
        if (!htmlStr) return ''
        return htmlStr.replace(/<\/?.+?>/g, '').replace(/ /g, '').replace(/&nbsp;/ig, '')
      },
      // 查询数据
      getList(fieldId = undefined, cond = []) {
        this.loading = true
        this.treeLoading = true
        this.showFieldList = this.dealBaseList = []
        this.calcSum()
        getDataListByView(this.queryParams).then(res => {
          this.showFieldList = res.datas.showFieldList
          this.dealBaseList = res.data.rows
          this.total = res.data.total
          if (fieldId && (typeof fieldId === 'string')) {
            if (cond && cond.length > 0) {
              this.searchQueryList = cond
              var obj = cond.find(item => item.fieldName === fieldId)
              if (!obj) {
                var type = this.showFieldList.find(item => item.fieldName === fieldId)
                obj = {
                  type: type.type,
                  fieldName: fieldId,
                  value: undefined,
                  conditions: 'HDY'
                }
              }
              this.groupData(obj, false)
            } else {
              // console.log(fieldId)
              type = this.showFieldList.find(item => item.fieldName === fieldId)
              obj = {
                type: type.type,
                fieldName: fieldId,
                value: undefined,
                conditions: 'HDY'
              }
              this.groupData(obj, false)
            }
          } else {
            this.closeGroup()
          }
          // // 重新计算高度
          // this.$nextTick(() => {
          //   // this.calcHeight()
          // })
          this.loading = false
          this.treeLoading = false
        })
      },
      // 展示字段
      fieldChange(id) {
        this.fieldShow = true
        this.$nextTick(() => {
          if (this.$refs.fieldShow) {
            this.$refs.fieldShow.getListById(id)
          }
        })
      },
      // 删除数据
      handleDelete(index) {
        this.$confirm(this.$t('是否永久删除该数据?'), this.$t('提示'), {
          confirmButtonText: this.$t('确定'),
          cancelButtonText: this.$t('取消'),
          type: 'warning'
        })
          .then(() => {
            this.tableform.splice(index, 1)
            this.$message({
              showClose: true,
              type: 'success',
              message: this.$t('删除成功')
            })
          })
          .catch(err => {
            this.$message({
              type: 'error',
              message: err
            })
          })
      },
      // 表单重置
      reset() {
        this.form = {
          id: undefined,
          dealName: undefined,
          dealNamePinyin: undefined,
          personCharge: undefined,
          dealType: undefined,
          companyId: undefined,
          industryFocus: undefined,
          dealSource: undefined,
          dateTouchFirst: undefined,
          dateInvestmentEstimate: undefined,
          amountInvestmentEstimate: undefined,
          currency: undefined,
          roundsInvestment: undefined,
          levelConcern: undefined,
          valuationBeforeInvestment: undefined,
          dealIntroduction: undefined,
          dealStrongPoint: undefined,
          dealScruple: undefined,
          managementModePostInvestment: undefined,
          planExit: undefined,
          createBy: undefined,
          createTime: undefined,
          updateBy: undefined,
          updateTime: undefined,
          remark: undefined,
          delFlag: undefined
        }
        this.resetForm('form')
      },
      /** 新增按钮操作 */
      addHandle() {
        this.formOpen = true
        this.$nextTick(() => {
          var data = {}
          data.dealStatus = this.dealStatus
          data.dealType = this.dealType
          const dt = this.$route.query.dealType
          if (this.dealBaseFormFlag === 'form') {
            data.formId = this.formId
            this.$refs.form.init(data)
          } else if (this.dealBaseFormFlag === 'configForm' && this.configFormDealType(dt)) { // 表单配置只支持 股权/债权/参股
                  this.$nextTick(() => {
                     this.$refs.onlineForm.initId(this.dealBaseFormTempletId)
                     this.$refs.onlineForm.init(null)
                     // 增加一个标识 标记从项目跳到 表单配置的
                  })
          } else {
              this.$refs.dealBaseForm.init(data)
          }
        })
      },
      // 持有型业务新增
      addPropertyHandle() {
        this.formPropertyOpen = true
        this.$nextTick(() => {
          var data = {}
          data.dealStatus = this.dealStatus
          data.dealType = this.dealType
          this.$refs.dealBasePropertyForm.init(data)
        })
      },
      addLeaseHandle() {
        this.formLeaseOpen = true
        this.$nextTick(() => {
          this.$refs.dealBaseLeaseForm.init({ dealStatus: this.dealStatus, dealType: this.dealType })
        })
      },
      /** 修改按钮操作 */
      updateHandle(row) {
        this.formOpen = true
        this.$nextTick(() => {
          row.id = row.项目ID
          row.dealType = this.dealType
          if (this.dealBaseFormFlag === 'form') {
            this.$refs.form.init(row)
          } else if (this.dealBaseFormFlag === 'configForm' && this.configFormDealType(this.dealType)) {
                  this.$nextTick(() => {
                    this.$refs.onlineForm.initId(this.dealBaseFormTempletId)
                     this.$refs.onlineForm.init(row)
                  })
          } else {
            this.$refs.dealBaseForm.init(row)
            this.$refs.dealBaseForm.$refs.form.clearValidate()
          }
        })
      },
      /** 持有型修改 */
      updatePropertyHandle(row) {
        this.formPropertyOpen = true
        this.$nextTick(() => {
          row.id = row.项目ID
          row.dealType = this.dealType
          if (!this.dealBaseFormFlag) {
            this.$refs.form.init(row)
          } else {
            this.$refs.dealBasePropertyForm.init(row)
            this.$refs.dealBasePropertyForm.$refs.form.clearValidate()
          }
        })
      },
      /** 修改融资租赁 */
      updateLeaseHandle(row) {
        this.formLeaseOpen = true
        this.$nextTick(() => {
          row.id = row.项目ID
          row.dealType = this.dealType
          if (!this.dealBaseFormFlag) {
            this.$refs.form.init(row)
          } else {
            this.$refs.dealBaseLeaseForm.init(row)
            this.$refs.dealBaseLeaseForm.$refs.form.clearValidate()
          }
        })
      },
      addSecuritiesHandle() {
        this.formSecuritiesOpen = true
        this.$nextTick(() => {
          var data = {}
          data.dealStatus = this.dealStatus
          data.dealType = this.dealType
          this.$refs.dealBaseSecuritiesForm.init(data)
        })
      },
      updateSecuritiesHandle(row) {
        this.formSecuritiesOpen = true
        this.$nextTick(() => {
          row.id = row.项目ID
          row.dealType = this.dealType
          if (!this.dealBaseFormFlag) {
            this.$refs.form.init(row)
          } else {
            this.$refs.dealBaseSecuritiesForm.init(row)
            this.$refs.dealBaseSecuritiesForm.$refs.form.clearValidate()
          }
        })
      },
      // 快速打开文档库
      openFileFolder(row) {
        this.fileFolderOpen = true
        this.businessDealId = row.项目ID
        this.folderBusType = this.dealType
        this.$nextTick(() => {
          this.$refs.fileFolder.addOneFolderSwitch = false
          this.$refs.fileFolder.dealBaseId = row.项目ID
        })
      },
      // 项目成员
      dealTeamHandle(row) {
        this.dealTeamOpen = true
        this.businessDealId = row.项目ID
      },
      // 易尽调
      companyHandle(row) {
        // console.log(row)
        if (!row.项目ID) {
          // 如果报错. 检查默认检索是否变动
          this.msgError('发生异常, 请联系管理员!')
        } else {
          // 重新获取公司信息
          this.loading = true
          reSaveDealBase({ 'id': row.项目ID }).then(response => {
            if (response.data.easyddId !== undefined && response.data.easyddId !== null && response.data.easyddId !== '') {
              window.open(config.easyddUrl + '/outConnect/company/base/companyBaseHome?companyId=' + response.data.easyddId + '&token=' + getToken())
            } else {
              this.$alert(this.$t('未查询到该公司的尽调信息, 请输入工商信息可查询到的公司名称!'), this.$t('提示'), {
                confirmButtonText: this.$t('关闭'),
                type: 'warning',
                callback: () => {}
              })
            }
            this.loading = false
          })
        }
      },
      /** 删除按钮操作 */
      deleteHandle(row) {
        this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
          confirmButtonText: this.$t('确定'),
          cancelButtonText: this.$t('取消'),
          type: 'warning'
        }).then(function() {
          row.id = row.项目ID
          return delDealBase(row.id)
        }).then(() => {
          this.getList()
          this.getViewList()
          this.getGroupValue()
          this.msgSuccess(this.$t('删除成功'))
        }).catch(function() {
        })
      },
      /** 导出按钮操作 */
      exportHandle() {
        const queryParams = this.queryParams
        this.$confirm(this.$t('是否确认导出?'), this.$t('警告'), {
          confirmButtonText: this.$t('确定'),
          cancelButtonText: this.$t('取消'),
          type: 'warning'
        }).then(function() {
          return exportDealBase(queryParams)
        }).then(response => {
          this.download(response.msg)
        }).catch(function() {
        })
      },
      // 分页保持排序
      currentChange() {
        this.loading = true
        this.calcSum()
        getDataListByView(this.queryParams).then(res => {
          this.dealBaseList = res.data.rows
          this.loading = false
        })
      },
      // 排序
      dataSort(column) {
        this.loading = true
        this.queryParams.pageNum = 1
        this.queryParams.viewId = this.viewId
        var searchOrderByVo = {}
        searchOrderByVo.prop = column.prop
        searchOrderByVo.order = column.order
        this.queryParams.searchOrderByVo = searchOrderByVo
        this.calcSum()
        getDataListByView(this.queryParams).then(res => {
          this.dealBaseList = res.data.rows
          this.loading = false
        })
      },
      // 文件上传中处理
      handleFileUploadProgress() {
        this.upload.isUploading = true
      },
      // 文件上传成功处理
      handleFileSuccess(response) {
        this.upload.open = false
        this.upload.isUploading = false
        this.$refs.upload.clearFiles()
        if (response.msg === 'success') {
          this.msgSuccess(this.$t('导入成功'))
        } else if (response.code === 500) {
          this.msgError(response.msg)
        } else {
          this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true })
        }
        // this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
        this.getList()
        this.getGroupValue()
      },
      // 提交上传文件
      submitFileForm() {
        this.$refs.upload.submit()
      },
      // 文件达到上限处理
      handleFileExceed() {
        this.msgError(this.$t('可上传文件数量已达到上限'))
      },
      // 文件上传变更时间
      handleFileChange(file, fileList) {
        if (!(file.name.indexOf('xls') >= 0 && file.name.indexOf('xlsx') >= 0)) {
          this.msgError(this.$t('仅允许导入“xls”或“xlsx”格式文件！'))
          fileList.splice(0, 1)
        }
      },
      // 下载模板
      fetchTemplate() {
        var href1 = window.location.href
        var href2 = this.$route.path
        var url = href1.substring(0, href1.indexOf(href2))
        // 根据项目类型下载不同的模板
        var templateRoute = ''
        var dealType = this.dealType || 'equity'
        if (dealType === 'equity') {
          templateRoute = '/template/equityImportTemplate.xlsx'
        } else if (dealType === 'debt') {
          templateRoute = '/template/claimsImportTemplate.xlsx'
        } else if (dealType === 'bf') {
          templateRoute = '/template/equityFundsImportTemplate.xlsx'
        } else if (dealType === 'estate') {
          templateRoute = '/template/realEstateImportTemplate.xlsx'
        } else if (dealType === 'property') {
          templateRoute = '/template/propertyImportTemplate.xlsx'
        } else if (dealType === 'lease') {
          templateRoute = '/template/leaseImportTemplate.xlsx'
        } else if (dealType === 'securities') {
          templateRoute = '/template/securitiesImportTemplate.xlsx'
        } else if (dealType === 'bond') {
          templateRoute = '/template/bondImportTemplate.xlsx'
        }
        if (templateRoute !== '') {
          window.location.href = url + templateRoute
        }
      },
      // 导出项目
      exportDeal() {
        this.downLoadExcelPost('/deal/dealList/export', this.queryParams).then(() => {
          this.msgSuccess(this.$t('导出成功'))
        })
      },
      cancel() {
        this.formOpen = false
        this.saveViewOpen = false
        this.getList()
        this.getGroupValue()
      },
      // 验证是否配置过该项目类型的页面
      configFormDealType(type) {
        var dealTypes = ['equity', 'debt', 'bf', 'anxin', 'KH', 'SAAS', 'market', 'HZHB', 'self_dev']
        if (type && dealTypes.indexOf(type) !== -1) {
          return true
        } else {
          return false
        }
      },
      // 高级查询
      advanceHandler() {
        this.advanceOpen = true
      },
      querySearch() {
        this.queryParams.pageNum = 1
        this.getGroupValue()
        this.getList()
      },
      expandTrack(item) {
        item.expend = !item.expend
      },
      onchangeItemType(e) {
        if (typeof e === 'string' || e instanceof String) {
          var itemTypeDict = this.itemTypeOptions.find(item => item.dictValue === e)
          if (itemTypeDict && itemTypeDict.remark === 'required') {
            this.isRequired = true
          } else {
            this.isRequired = false
          }
        }
      },
      onlinePreview(fileId) {
        this.$refs.OnlinePreview.onlinePreviewFile(fileId, 'view')
      },
      download(fileId) {
        downLoadFileOpen(fileId)
      }
    }
  }
</script>
<style lang="scss" scoped>
#table::-webkit-scrollbar {
  display: none; /* Chrome Safari */
}

#table {
  scrollbar-width: none; /* firefox */
  -ms-overflow-style: none; /* IE 10+ */
  overflow-x: hidden;
  overflow-y: auto;
}

.sideBar-content {
  margin-top: 10px;
  margin-right: -10px;
  height: calc(100% - 70px);
  .industryUl, .industry_tree{
    height: 100%;
    overflow: auto;
  }
  /deep/.industry_tree{
    padding-right: 10px;
    .el-tree {
      .el-tree-node__content {
        height: 30px;
      }
      .industry_tree_node{
        display: flex;
        align-items: center;
        justify-content: space-between;
        column-gap: 5px;
        width: 100%;
        font-size: 13px;
        overflow: hidden;
        span{
          &:first-child{
            white-space: nowrap;
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }
      }
    }
  }
}

.list-row{
  .el-select{
    margin-bottom: 5px;
    width: 75%;
  }
}

  .newMess .el-form,
  .newMess .el-table {
    margin-bottom: 20px;
  }

  li {
    list-style: none;
  }
  .list-views {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    height: 52px;
    display: flex;
    margin: 0;
    padding: 0;
    overflow-x:auto ;
  }
  .tag-number {
    font-family: PingFangSC-Medium;
    font-size: 20px;
    color: #fff;
    line-height: 20px;
  }
  .tag-label {
    font-family: PingFangSC-Regular;
    font-size: 12px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
    max-width: 90px;
  }

  .list-views li.selected:after {
    position: absolute;
    content: "";
    display: block;
    top: 1px;
    right: 4px;
    width: 4px;
    height: 7px;
    border-style: solid;
    border-color: white;
    border-width: 0 2px 2px 0;
    transform: rotateZ(45deg);
  }
  .list-views li {
    margin-right: 10px;
    font-size: 12px;
    border-radius: 2px;
    width: 120px;
    min-width: 100px;
    height: 50px;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    cursor: pointer;
    background: #a4afeb;
    text-align: center;
    display: flex;
    position: relative;
  }
  .tag-views-title {
    display: inline-block;
    float: left;
    font-size: 14px;
  }
  .table-grid-content {
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
  }

  .table-input {
    outline-style: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    width: 200px;
    font-size: 14px;
    height: 30px;
  }

  .el-table td {
    padding: 4px 0;
    font-size: 13px;
  }

  .list-table {
    padding: 10px;
    -webkit-box-shadow: 0 3px 12px 2px rgba(218, 223, 232, 0.5);
    box-shadow: 0 3px 12px 2px rgba(218, 223, 232, 0.5);
    border: 1px solid #ebeef5;
    background-color: #fff;
    color: #303133;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    border-radius: 4px;
    overflow: hidden;
  }

  .el-table__header th {
    background-color: #f6f7fb !important;
    padding: 2px 0;
  }

  .el-table .cell {
    white-space: nowrap;
  }

  .el-dialog {
    width: 800px;
  }

  .list-left {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding-left: 10px;
  }

  .module-list-switch {
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
  }

  .module-list-switch .list-switch {
    background: #f6f7fb;
    border-right: 1px solid #e6e9f5;
    width: 18px;
    height: 126px;
    font-size: 12px;
    color: #9da2b3;
    text-align: center;
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
    cursor: pointer;
    line-height: 16px;
  }

  .module-list-switch .list-switch i {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    vertical-align: initial;
    height: 100%;
    display: flex;
    font-style: normal;
  }

  .shai-side-collapsed {
    width: 220px;
    border-right: 1px solid #e6e9f5;
  }

  .shai-side-expanded {
    width: 0px;
    display: none;
  }

  .slideInRight,
  .Table-table {
    display: flex;
    .left{
      box-shadow: 0px 0px 4px 0px #001AA31A;
      padding: 10px;
      border-radius: 5px;
      background-color: #F3F6FB;
      width: 180px;
      min-width: 180px;
      max-width: 180px;
      margin-right: 15px;
      height: 100%;
      //overflow: hidden;
      scrollbar-width: none; /* firefox */
      -ms-overflow-style: none; /* IE 10+ */
      ul,div.industry{
        //min-height: 50%;
        //margin-top: 20px;
      }
      .el-divider{
        margin: 15px 0;
      }
      .tags{
        display: grid;
        grid-template-columns: repeat(2, 71px);
        grid-column-gap: 10px;
        grid-row-gap: 10px;
        font-size: 13px;
        margin-top: 15px;
        span{
          cursor: pointer;
        }
      }
    }

    .industryUl {
      li{
        display: flex;
        justify-content: space-between;
        column-gap: 5px;
        cursor: pointer;
        font-size: 13px;
        padding: 6px 10px;
        margin: 7px 0;
        border-radius: 0 5px 5px 0;
        border-left: 1px solid transparent;
        span{
          &:first-child{
            white-space: nowrap;
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }
      }
      .link-type{
        background: rgba(67, 78, 184, 0.1);
        border-left: 1px solid rgba(67, 78, 184, 1);
      }
      .tags{
        display: grid;
        grid-template-columns: repeat(2, 60px);
        grid-column-gap: 10px;
        grid-row-gap: 10px;
        font-size: 13px;
        span{
          cursor: pointer;
        }
      }
    }
    .tit {
      display: flex;
      width: 100%;
      justify-content: center;
    }
  }

  .slideInRight {
    margin-right: 10px;
    height: 500px;
    margin-left: -10px;
  }

  .list-left .left-header {
    height: 40px !important;
    padding: 0;
    font-size: 14px;
    padding-right: 10px;
  }

  .list-left .left-main {
    margin-top: 10px;
    height: calc(100% - 85px);
    margin-bottom: 5px;
    overflow: auto;
    padding: 0;
  }

  .list-left .left-main .el-checkbox {
    display: block;
    margin-bottom: 5px;
  }
  .list-row {
    margin-bottom: 10px;
    width: 165px;
  }

  .list-left .left-footer {
    height: 33px !important;
    padding: 0;
    text-align: right;
    margin-right: 15px;
  }
  .field .el-transfer-panel {
    width: 260px !important;
  }
  .el-pagination {
    text-align: right;
    margin-top: 10px;
  }
  .tableDiv {
    position: relative;
    overflow: hidden;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    width: 100%;
    max-width: 100%;
    font-size: 14px;
    color: #606266;
  }
  .btnDiy {
    text-align: right;
  }
  .btnDiy button {
    padding: 8px 20px;
    border-radius: 0px;
  }
  .btnDiy .el-button + .el-button {
    margin-left: 0px;
  }

  .viewItem {
    margin: 15px 0 10px;
  }
  /deep/ .el-dropdown, .el-icon-s-tools{
    cursor: pointer;
  }
  /deep/ .el-dropdown-menu__item{
    white-space: nowrap;
  }

/deep/.table .el-table__fixed {
  height: calc(100% + 17px) !important;
  .el-table__fixed-footer-wrapper {
    bottom: 17px;
  }
}
/deep/.table .el-table__fixed-right {
  height: calc(100% + 17px) !important;
  .el-table__fixed-footer-wrapper {
    bottom: 17px;
  }
}
/** 合计行内容靠右 */
/deep/.el-table .el-table__footer-wrapper .cell{
  text-align: right;
}
.hide-add-deal-list-btn {
  position: absolute;
  right: 0;
  width: 245px;
  height: 50px;
  border: 1px white solid;
  float: right;
  margin-top: -40px;
  background: white;
}

/deep/.list-table {
  .el-button.advance-query {
    border: none;
    color: #434EB8!important;
  }
}
.track {
  padding: 15px 20px;
}
/deep/.trackForm {
  .el-form-item__content {
    padding-right:0!important;
  }
}

.track-line {
  .title {
    font-size: 16px;
    font-weight: bolder;
  }

  ul li {
    position: relative;
    margin-top: 15px;

    .avatar {
      width: 30px;
      height: 30px;
      display: inline-block;
      border-radius: 50%;
      background: #000;
      vertical-align: middle;
    }

    .nickName {
      font-size: 13px;
      display: inline-block;
      vertical-align: middle;
      font-weight: 400;
      margin-right: 10px;
    }

    .time {
      font-size: 13px;
      font-weight: 400;
      display: inline-block;
      vertical-align: middle;
    }

    .line-info {
      //margin-top: 20px;
      word-break: break-all;
    }
  }
}
/deep/.el-tag{
  cursor: pointer;
}
/deep/.editTxt{
  // .tox-statusbar{
  //   display: none;
  // }
  // .tox-toolbar-overlord .tox-toolbar {
  //   display: none;
  // }
  // .tox-menubar{
  //   display: none;
  // }
}
/deep/.line-info{
  color: #333;
  font-size: 13px;
  ul li {
    line-height: 25px;
  }
  div{
    line-height: 25px;
  }
  p {
    margin: 0;
    font-size: 13px;
    line-height: 25px;
  }
  p span{
    font-size: 13px;
    line-height: 25px;
  }
}
.content{
  background-color: #F9FAFC;
  border-radius: 6px;
  padding:10px 15px;
  .tag{
    padding: 10px 0px;
    .el-tag{
      border: 0;
    }
    .trackMode{
      color: #FF8643;
      background-color: #FAE9E0;
    }
  }
  .userInfo{
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #8C8C8C;
    padding: 8px 0px;
    border-top: 1px solid #EAEAEA;
  }
  .line-text{
    display: -webkit-box;
    -webkit-line-clamp: 4;
    overflow: hidden;
    text-overflow: clip;
    word-break: break-all;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    position: relative;
    .btn {
      position: absolute;
      right: 5px;
      bottom: 0px;
      background-image: linear-gradient(to right, rgba(246, 248, 250,0) , rgba(246, 248, 250,1) 80% );
      background-color: rgb(246, 248, 250);
      padding-left: 5px;
      .el-button {
        padding-top: 0;
        padding-bottom: 0;
        font-size: 13px;
      }
    }
  }
  .otherFile{
    display: flex;
    font-size: 13px;
    margin: 0;
    color: #8C8C8C;
    line-height: 20px;
    .file{
      margin-left: 10px;
      p{
        margin: 0;
        display: flex;
        align-items: center;
        column-gap: 10px;
      }
    }
  }
}

/deep/ .tableDiv {
  .el-table__row{
    td:not(.is-hidden){
      bottom:1px;
    }
  }
  //.el-table__body-wrapper::-webkit-scrollbar {
  //  width: 2px; // 横向滚动条
  //  height: 6px; // 纵向滚动条 必写
  //}
  //
  ///** 设置表格内设的滚动条宽度，适应动态计算 */
  //.el-table__body-wrapper, .el-scrollbar__wrap {
  //  &::-webkit-scrollbar {
  //      width: 2px;
  //      height: 2px;
  //    }
  //  }
  //
  //.el-table th.gutter{
  //  display: none;
  //  width:0
  //}
  //.el-table colgroup col[name='gutter']{
  //  display: none;
  //  width: 0;
  //}
  //
  //.el-table__body{
  //  width: 100% !important;
  //}
  //.el-table .el-table__fixed-right-patch {
  //  width: 0px !important;
  //}
}

/deep/ .badge-item {
  .el-badge__content.is-fixed {
    top: 10px;
    right: 15px
  }
}
/deep/.tox .tox-editor-header{
  // padding: 0!important;
}
/deep/.el-progress{
  display: none;
}
</style>
